package com.minimalist.common.feign.client.lindi;

import com.minimalist.common.config.mybatis.bo.PageResp;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationfile.LindiSubsidyApplicationFileQueryVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationfile.LindiSubsidyApplicationFileVO;
import com.minimalist.common.feign.config.FeignConfig;
import com.minimalist.common.feign.fallback.lindi.LindiSubsidyApplicationFileFeignClientFallbackFactory;
import com.minimalist.common.response.R;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import jakarta.validation.constraints.NotNull;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 林地指标交易平台_补贴申请文件Feign客户端
 *
 * @author 11987
 */
@FeignClient(name = "minimalist-lindi"
        , contextId = "lindiSubsidyApplicationFileFeignClient"
        , path = "/minimalist/lindi/subsidyApplicationFile"
        , configuration = FeignConfig.class
        , fallbackFactory = LindiSubsidyApplicationFileFeignClientFallbackFactory.class)
public interface LindiSubsidyApplicationFileFeignClient{

    /**
     * 添加补贴申请文件
     * 
     * @param subsidyApplicationFileVO 补贴申请文件信息对象，包含文件的详细信息
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @PostMapping("/addSubsidyApplicationFile")
    @Operation(summary = "添加补贴申请文件")
    R<?> addSubsidyApplicationFile(
            @RequestBody @Validated(Add.class)
            LindiSubsidyApplicationFileVO subsidyApplicationFileVO);

    /**
     * 根据补贴申请文件ID删除补贴申请文件
     * 
     * @param subsidyApplicationFileId 补贴申请文件ID，不能为空
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @DeleteMapping("/deleteSubsidyApplicationFileBySubsidyApplicationFileId")
    @Operation(summary = "删除补贴申请文件 -> 根据补贴申请文件ID删除")
    R<?> deleteSubsidyApplicationFileBySubsidyApplicationFileId(
            @RequestParam("subsidyApplicationFileId")
            @NotNull(message = "补贴申请文件ID不能为空")
            @Parameter(name = "subsidyApplicationFileId", required = true, description = "补贴申请文件ID")
            Long subsidyApplicationFileId);

    /**
     * 根据补贴申请文件ID修改补贴申请文件信息
     * 
     * @param subsidyApplicationFileVO 补贴申请文件信息对象，包含需要更新的文件信息
     * @return 操作结果，成功返回成功信息，失败返回错误信息
     * @author 11987
     * @since 1.0.0
     */
    @PutMapping("/updateSubsidyApplicationFileBySubsidyApplicationFileId")
    @Operation(summary = "修改补贴申请文件")
    R<?> updateSubsidyApplicationFileBySubsidyApplicationFileId(
            @RequestBody @Validated(Update.class)
            LindiSubsidyApplicationFileVO subsidyApplicationFileVO);

    /**
     * 分页查询补贴申请文件列表
     * 
     * @param queryVO 查询条件对象，包含分页参数和筛选条件
     * @return 分页结果，包含补贴申请文件列表和分页信息
     * @author 11987
     * @since 1.0.0
     */
    @GetMapping("/getPageSubsidyApplicationFileList")
    @Operation(summary = "查询补贴申请文件列表(分页)")
    R<PageResp<LindiSubsidyApplicationFileVO>> getPageSubsidyApplicationFileList(LindiSubsidyApplicationFileQueryVO queryVO);

    /**
     * 根据补贴申请文件ID查询补贴申请文件详细信息
     * 
     * @param subsidyApplicationFileId 补贴申请文件ID，不能为空
     * @return 补贴申请文件详细信息，如果不存在则返回空
     * @author 11987
     * @since 1.0.0
     */
    @GetMapping("/getSubsidyApplicationFileBySubsidyApplicationFileId/{subsidyApplicationFileId}")
    @Operation(summary = "根据补贴申请文件ID查询补贴申请文件")
    R<LindiSubsidyApplicationFileVO> getSubsidyApplicationFileBySubsidyApplicationFileId(
            @PathVariable(value = "subsidyApplicationFileId")
            @NotNull(message = "补贴申请文件ID不能为空")
            @Parameter(name = "subsidyApplicationFileId", description = "补贴申请文件ID", required = true)
            Long subsidyApplicationFileId);

    /**
     * 根据补贴申请ID查询补贴申请文件列表
     * 
     * @param subsidyApplicationId 补贴申请ID，不能为空
     * @return 补贴申请文件列表，如果没有文件则返回空列表
     * @author 11987
     * @since 1.0.0
     */
    @GetMapping("/getSubsidyApplicationFileListBySubsidyApplicationId/{subsidyApplicationId}")
    @Operation(summary = "根据补贴申请ID查询补贴申请文件列表")
    R<List<LindiSubsidyApplicationFileVO>> getSubsidyApplicationFileListBySubsidyApplicationId(
            @PathVariable(value = "subsidyApplicationId")
            @NotNull(message = "补贴申请ID不能为空")
            @Parameter(name = "subsidyApplicationId", description = "补贴申请ID", required = true)
            Long subsidyApplicationId);
}